<#macro templateTree field filepath=''>
	<@_taskTemplateList path=filepath>
		<#list list as a>
		<li>
			<#local path=filepath+'/'+a.fileName/>
		<#if a.directory>
			<a href="javascript:;">${a.fileName}</a>
			<ul>
				<@templateTree field type path/>
			</ul>
		<#else>
			<a href="javascript:;" data="${path?url}" onclick="$.bringBack({'${field}':'${path}'});return false;">
				${a.fileName}
			</a>
		</#if>
		</li>
		<#else>
			<li><a>空目录</a></li>
		</#list>
	</@_taskTemplateList>
</#macro>
<div class="pageFormContent" layoutH="19">
	<ul class="tree treeFolder">
		<@templateTree field type/>
	</ul>
	<script>
		$('a[data="${(value!)?url?js_string}"]',$.pdialog.getCurrent()).parent().addClass('selected');
	</script>
</div>